package com.github.cooingandwooing.uaa.service.admin;

import java.util.List;

import com.github.cooingandwooing.uaa.annotation.RoleAdminOrRead;
import com.github.cooingandwooing.uaa.domain.Permission;
import com.github.cooingandwooing.uaa.repository.PermissionRepo;
import lombok.RequiredArgsConstructor;

import org.springframework.stereotype.Service;

@RequiredArgsConstructor
@Service
public class   PermissionAdminService {

    private final PermissionRepo permissionRepo;

    @RoleAdminOrRead
    public List<Permission> findAll() {
        return permissionRepo.findAll();
    }
}
